#pragma once

#include <Ogre.h>

enum AnimID
{
	ANIM_ROBOT_RUN,
	ANIM_ROBOT_WALK,
	ANIM_ROBOT_SPRINT,
	ANIM_STANT_STAND,
	ANIM_STANT_STAND1,
	ANIM_STANT_STAND2,
	ANIM_STANT_STAND3
};

class RobotCtrl
{
private:
	Ogre::SceneManager* m_Smgr;
	Ogre::SceneNode* m_Node;
	Ogre::Entity* m_Ent;
	Ogre::AnimationState* m_Anims[8]; 
	Ogre::Vector3 m_CurrenTarget;
	Ogre::Vector3 m_AtkTarget;

	float m_Timer;
	float m_AnimSpeed;
	float m_MovSpeed;
	AnimID m_CurrentAnimID;
public:
	RobotCtrl(Ogre::SceneManager* smgr,Ogre::String name);
	~RobotCtrl(void);

	void Init();
	void RunAndAttack(Ogre::Vector3 movtag, Ogre::Vector3 attacktag);

	void Updata(float deltaTime);
	float GetCurrentAnimTime();
	bool IsAttack();

};
